package Huihu.src.刷题;

import java.util.Scanner;

public class 求和 {
    public static void main(String[] args) {
        Scanner scanner=new Scanner(System.in);
        System.out.println("请输入你要输入几个数：");
        int n=scanner.nextInt();
        int [] array=new int[n];
        int sum=0;
        for (int i = 0; i < array.length; i++) {
            array[i]=scanner.nextInt();
        }
        for (int i = 0; i < array.length; i++) {
            sum+=array[i];
        }
        System.out.println(sum);
    }
}
